<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width,initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" />
  <meta th:if="${token!=null}" http-equiv="refresh" th:content="|${sec};url=${callback}|" />
</head>
<body>

<th:block th:if="${token!=null}">
  <div>登录成功，正在跳转...</div>
  <script th:inline="javascript">
    // 写本地存储
    localStorage.setItem('token', '[[${token}]]')
    // 写入会话
    document.cookie = 'token=[[${token}]];expires=30;path=/'
  </script>
</th:block>

<th:block th:if="${token==null}">
  <div>需要在管理员审核后才能进入系统！</div>
</th:block>

</body>
</html>
